#!/usr/bin/python
# Filename: 12.py
#if I don't half the picture, The program produce 
#the picture is always the as original picture, strange
import Image
im = Image.open('cave.jpg')
w, h = im.size
new_im = Image.new(im.mode, (w/2, h/2))

for i in range(w*h):
	y, x = divmod(i, w)
	p = im.getpixel((x, y))
	if(i%2 == 1):
		new_im.putpixel((x/2, y/2), p)
new_im.show()
new_im.save('12.jpg')
#evil